<template>

	<div>

		<div>
			<dialog :open="bShow" v-bind:style="`height:${hight}px;`">
				<h2>{{title}}</h2>
				<slot></slot>
				<button @click="ok()">确认</button>
			</dialog>
		</div>

	</div>

</template>

<script setup>
</script>

<script>
	export default { //将来 import
		name: 'MyDialog',

		props: {
			title: {
				type: String,
				default: '标题'
			},
			hight: {
				type: Number,
				default: 100
			}
		},

		data() {
			return {

				bShow: true,

			}
		},
		methods: {

			ok() {

				// alert("儿子：" + this.title)

				this.bShow = false;

				this.$emit("clickok", 100, "儿子：" + this.title)
			}

		},
		mounted() { //回调函数，钩子函数

		},

	}
</script>

<style>
</style>
